//二维数组处理图案模拟问题
#include "cstdio"

char arr[1000][3000];//全局数组
typedef int elemtype;
int main()
{
    int h;
    while (scanf("%d", &h) != EOF)
    {
        for (int i = 0; i < h; ++i) {
            for (int j = 0; j < 3 * h - 2; ++j)
            {
                arr[i][j] = ' ';
            }
            arr[i][3*h-2]='\0';//\0用来指示每一行字符串的结束
        }
        int beg = 0;
        for (int i = h - 1; i >= 0; --i) {
            for (int j = beg; j < 3 * h - 2; ++j)
            {
                arr[i][j] = '*';
            }
            beg = beg + 2;
        }
        for (int i = 0; i < h; ++i) {
            for (elemtype j = 0; j < 3 * h - 2; ++j)
            {
                printf("%c", arr[i][j]);
            }
            printf("\n");
        }
    }
}